﻿<%@ Page Title="Client Master" Language="C#" MasterPageFile="~/AuditBillingMaster.master" AutoEventWireup="true" CodeFile="ClientMaster.aspx.cs" Inherits="ClientMaster" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <script src="../JS/Forms/jsClientMaster.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cntList" runat="Server">
    <asp:HiddenField runat="server" ID="hdnExportToExcelFilePath" ClientIDMode="Static" />
    <input type="hidden" id="hdnClientID" runat="server" value="0" clientidmode="Static" />
    <div class="pagecontent">
        <div class="headercontainer">
            <div class="headertextcontainer halfpanel">
                Client Master
            </div>
            <div class="headerbuttoncontainer halfpanel">
                <a id="A1" href='javascript:void(0);' onclick="toggle_TopContainer();" tabindex="5" class="headersearchbutton" title="Toggle Search Panel" runat="server">Search</a>&nbsp;&nbsp;<a
                    runat="server" href='javascript:void(0);' id="lnkAdd" tabindex="6" clientidmode="Static" class="headeraddbutton" title="Add Company"
                    onclick='javascript:ShowEditDiv(0,this);'>Add Client</a>
                <a href="#" onclick="fn_ExportToExcel();" class="headerexportbutton">Export To Excel</a>

            </div>
        </div>
        <div id="divTopContainer" class="topcontainerwrapper">
            <div class="topcontainerSmall" onkeypress="javascript:return fireDefaultButton(event, 'btnSearch')">
                <div class="halfpanel">
                    <div class="row">
                        <asp:TextBox ID="txtSearchClientName" runat="server" ClientIDMode="Static" MaxLength="50"
                            TabIndex="1" CssClass="searchCntrl" placeholder="Client Name"></asp:TextBox>
                    </div>
                </div>
                <div class="halfpanel">
                    <div class="row">
                        <asp:DropDownList ID="cboStatus" ClientIDMode="Static" runat="server" TabIndex="2"
                            CssClass="searchCntrl" Width="70%">
                            <asp:ListItem Value="2" Text="Both"></asp:ListItem>
                            <asp:ListItem Value="1" Text="Active"></asp:ListItem>
                            <asp:ListItem Value="0" Text="InActive"></asp:ListItem>
                        </asp:DropDownList>
                    </div>
                </div>
                <div class="fullpanel textalignright">
                    <a tabindex="3" class="btn-search-clear" onclick="clear_form_elements('divTopContainer');" onkeypress="clear_form_elements_ForTab(event,'divTopContainer');" href="javascript:void(0);">Clear</a>
                    <input type="button" id="btnSearch" tabindex="3" class="btn-search" onclick="javascript: return fn_GetSearchResult(0);"
                        value="Search" title="Search" />
                </div>
            </div>
            <a href='javascript:void(0);' class="closedivSmall" onclick="toggle_TopContainer();" title="Toggle Search Panel" tabindex="4"><i class="fa fa-chevron-up"></i></a>
        </div>
        <div class="maincontainer">
            <div class="listpagediv" id="divResult">
                <asp:GridView ID="grdResult" runat="server" ClientIDMode="Static" AutoGenerateColumns="false" Width="95%" CssClass="listdiv" DataKeyNames="ClientID" OnRowDataBound="grdResult_RowDataBound">
                    <Columns>
                        <asp:BoundField DataField="ClientID" HeaderText="Client Id" />
                        <asp:BoundField HeaderText="Sr." ItemStyle-HorizontalAlign="Center" />
                        <asp:TemplateField HeaderText="Action" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <a class="btn-edit" href="javascript:void(0);" onclick="return ShowEditDiv(1,this);" title="Edit"><i class="fa fa-pencil" title="Edit"></i></a>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="ClientName" HeaderText="Name" />
                        <asp:BoundField DataField="Industry" HeaderText="Industry" />
                        <asp:BoundField DataField="Address1" HeaderText="Address1" />
                        <asp:BoundField DataField="Address2" HeaderText="Address2" />
                        <asp:BoundField DataField="City" HeaderText="City" />
                        <asp:BoundField DataField="PinCode" HeaderText="PinCode" />
                        <asp:BoundField DataField="Phone" HeaderText="Phone" />
                        <asp:BoundField DataField="Email" HeaderText="Email" />
                        <asp:BoundField DataField="Fax" HeaderText="Fax" />
                        <asp:BoundField DataField="PAN" HeaderText="PAN" />
                        <asp:BoundField DataField="TIN" HeaderText="TIN" />

                        <asp:BoundField DataField="ContactPersonName" HeaderText="Contact Person Name" />
                        <asp:BoundField DataField="ContactPersonPhone" HeaderText="Contact Person Phone" />
                        <asp:BoundField DataField="ContactPersonEmail" HeaderText="Contact Person Email" />

                        <asp:TemplateField HeaderText="Serv. Tax Allow" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <%#(Convert.ToBoolean(Eval("IsServiceTaxAllowed")) == true ? "Active" : "InActive") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Status" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <%#(Convert.ToBoolean(Eval("IsActive")) == true ? "Active" : "InActive") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </div>

        </div>
    </div>
    <div class="modalopenConfirmDel modalopenCompany" style="display: none;">
    </div>

    <div id="divInsertEdit" class="modalCompany" onkeypress="javascript:return fireDefaultButton(event, 'btnSave')">
        <div class="form">
            <div class="innercontent">
                <div class="halfpanel">
                    <div class="row">
                        <div class="midium-label">
                            Client Name&nbsp;&nbsp;<span class="red">*</span>
                        </div>
                        <div class="midium-value">
                            <asp:TextBox ID="txtClientName" runat="server" ClientIDMode="Static" Width="97%"
                                MaxLength="50" placeholder="Enter Client Name" CssClass="input" TabIndex="101"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="rfvtxtClientName" runat="server" Display="Dynamic" ClientIDMode="Static"
                                ControlToValidate="txtClientName" ValidationGroup="vgSave" ErrorMessage="Enter Client Name"
                                Width="90%"><span class="error">Enter client name</span></asp:RequiredFieldValidator>
                            <asp:CustomValidator ID="cvtxtClientName" runat="server" ClientIDMode="Static" ControlToValidate="txtClientName"
                                ClientValidationFunction="fn_ValidateExpressionTextbox" ValidationGroup="vgSave" ValidateEmptyText="false" expressionid="AlpNumSplChar"
                                Display="Dynamic" Width="90%"><span id="spnFirstName" class="error"></span></asp:CustomValidator>
                        </div>
                    </div>
                    <div class="clear"></div>
                    <div class="row">
                        <div class="midium-label">
                            Address 1&nbsp;&nbsp;<span class="red">*</span>
                        </div>
                        <div class="midium-value">
                            <asp:TextBox ID="txtAddress1" runat="server" ClientIDMode="Static" Width="97%"
                                MaxLength="50" placeholder="Enter Address 1" CssClass="input" TabIndex="102"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="rfvtxtAddress1" runat="server" Display="Dynamic" ClientIDMode="Static"
                                ControlToValidate="txtAddress1" ValidationGroup="vgSave" ErrorMessage="Enter Address 1"
                                Width="90%"><span class="error">Enter address 1</span></asp:RequiredFieldValidator>
                            <asp:CustomValidator ID="cvtxtAddress1" runat="server" ClientIDMode="Static" ControlToValidate="txtAddress1"
                                ClientValidationFunction="fn_ValidateExpressionTextbox" ValidationGroup="vgSave" ValidateEmptyText="false" expressionid="AlpNumSplChar"
                                Display="Dynamic" Width="90%"><span id="Span1" class="error"></span></asp:CustomValidator>
                        </div>
                    </div>
                    <div class="clear"></div>
                    <div class="row">
                        <div class="midium-label">
                            City&nbsp;&nbsp;<span class="red">*</span>
                        </div>
                        <div class="midium-value">
                            <asp:TextBox ID="txtCity" runat="server" ClientIDMode="Static" Width="97%"
                                MaxLength="50" placeholder="Enter City" CssClass="input" TabIndex="104"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="rfvtxtCity" runat="server" Display="Dynamic" ClientIDMode="Static"
                                ControlToValidate="txtCity" ValidationGroup="vgSave" ErrorMessage="Enter City"
                                Width="90%"><span class="error">Enter city</span></asp:RequiredFieldValidator>
                            <asp:CustomValidator ID="cvtxtCity" runat="server" ClientIDMode="Static" ControlToValidate="txtCity"
                                ClientValidationFunction="fn_ValidateExpressionTextbox" ValidationGroup="vgSave" ValidateEmptyText="false" expressionid="Alp"
                                Display="Dynamic" Width="90%"><span id="Span2" class="error"></span></asp:CustomValidator>
                        </div>
                    </div>
                    <div class="clear"></div>
                    <div class="row">
                        <div class="midium-label">
                            Phone&nbsp;&nbsp;<span class="red">*</span>
                        </div>
                        <div class="midium-value">
                            <asp:TextBox ID="txtPhone" runat="server" ClientIDMode="Static" Width="97%"
                                MaxLength="50" placeholder="Enter Phone" CssClass="input" TabIndex="106"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="rfvtxtPhone" runat="server" Display="Dynamic" ClientIDMode="Static"
                                ControlToValidate="txtPhone" ValidationGroup="vgSave" ErrorMessage="Enter Phone"
                                Width="90%"><span class="error">Enter phone</span></asp:RequiredFieldValidator>
                            <asp:CustomValidator ID="cvtxtPhone" runat="server" ClientIDMode="Static" ControlToValidate="txtPhone"
                                ClientValidationFunction="fn_ValidateExpressionTextbox" ValidationGroup="vgSave" ValidateEmptyText="false" expressionid="Phone&Fax"
                                Display="Dynamic" Width="90%"><span id="Span4" class="error"></span></asp:CustomValidator>
                        </div>
                    </div>
                    <div class="clear"></div>
                    <div class="row">
                        <div class="midium-label">
                            Email&nbsp;&nbsp;<span class="red">*</span>
                        </div>
                        <div class="midium-value">
                            <asp:TextBox ID="txtEmail" runat="server" ClientIDMode="Static" Width="97%"
                                MaxLength="50" placeholder="Enter Email" CssClass="input" TabIndex="108"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="rfvtxtEmail" runat="server" Display="Dynamic" ClientIDMode="Static"
                                ControlToValidate="txtEmail" ValidationGroup="vgSave" ErrorMessage="Enter Email"
                                Width="90%"><span class="error">Enter email</span></asp:RequiredFieldValidator>
                            <asp:CustomValidator ID="cvtxtEmail" runat="server" ClientIDMode="Static" ControlToValidate="txtEmail"
                                ClientValidationFunction="fn_ValidateExpressionTextbox" ValidationGroup="vgSave" ValidateEmptyText="false" expressionid="Email"
                                Display="Dynamic" Width="90%"><span id="Span5" class="error"></span></asp:CustomValidator>
                        </div>
                    </div>
                    <div class="clear"></div>
                    <div class="row">
                        <div class="midium-label">
                            Contact Person Name
                        </div>
                        <div class="midium-value">
                            <asp:TextBox ID="txtContactPersonName" runat="server" ClientIDMode="Static" Width="97%"
                                MaxLength="50" placeholder="Enter Contact Person Name" CssClass="input" TabIndex="110"></asp:TextBox>
                            <asp:CustomValidator ID="cvtxtContactPersonName" runat="server" ClientIDMode="Static" ControlToValidate="txtContactPersonName"
                                ClientValidationFunction="fn_ValidateExpressionTextbox" ValidationGroup="vgSave" ValidateEmptyText="false" expressionid="Alp"
                                Display="Dynamic" Width="90%"><span id="Span6" class="error"></span></asp:CustomValidator>
                        </div>
                    </div>
                    <div class="clear"></div>
                    <div class="row">
                        <div class="midium-label">
                            Contact Person Email
                        </div>
                        <div class="midium-value">
                            <asp:TextBox ID="txtContactPersonEmail" runat="server" ClientIDMode="Static" Width="97%"
                                MaxLength="50" placeholder="Enter Contact Person Email" CssClass="input" TabIndex="112"></asp:TextBox>
                            <asp:CustomValidator ID="cvContactPersonEmail" runat="server" ClientIDMode="Static" ControlToValidate="txtContactPersonEmail"
                                ClientValidationFunction="fn_ValidateExpressionTextbox" ValidationGroup="vgSave" ValidateEmptyText="false" expressionid="Email"
                                Display="Dynamic" Width="90%"><span id="Span7" class="error"></span></asp:CustomValidator>
                        </div>
                    </div>
                    <div class="clear"></div>
                    <div class="row">
                        <div class="midium-label">
                            Service Tax Allowed
                        </div>
                        <div class="midium-value">
                            <asp:CheckBox ID="chkIsServiceTaxAllowed" runat="server" ClientIDMode="Static" TabIndex="114" />
                        </div>
                    </div>
                    <div class="clear"></div>
                </div>
                <div class="halfpanel">
                    <div class="row">
                        <div class="midium-label">
                            Industry&nbsp;&nbsp;<span class="red">*</span>
                        </div>
                        <div class="midium-value">
                            <asp:TextBox ID="txtIndustry" runat="server" ClientIDMode="Static" Width="97%"
                                MaxLength="50" placeholder="Enter Industry" CssClass="input" TabIndex="101"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="rdvtxtIndustry" runat="server" Display="Dynamic" ClientIDMode="Static"
                                ControlToValidate="txtIndustry" ValidationGroup="vgSave" ErrorMessage="Enter Industry"
                                Width="90%"><span class="error">Enter industry</span></asp:RequiredFieldValidator>
                            <asp:CustomValidator ID="cvtxtIndustry" runat="server" ClientIDMode="Static" ControlToValidate="txtIndustry"
                                ClientValidationFunction="fn_ValidateExpressionTextbox" ValidationGroup="vgSave" ValidateEmptyText="false" expressionid="AlpNumSplChar"
                                Display="Dynamic" Width="90%"><span id="Span3" class="error"></span></asp:CustomValidator>
                        </div>
                    </div>
                    <div class="clear"></div>
                    <div class="row">
                        <div class="midium-label">
                            Address 2&nbsp;&nbsp;<span class="red">*</span>
                        </div>
                        <div class="midium-value">
                            <asp:TextBox ID="txtAddress2" runat="server" ClientIDMode="Static" Width="97%"
                                MaxLength="50" placeholder="Enter Address 2" CssClass="input" TabIndex="103"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="rfvtxtAddress2" runat="server" Display="Dynamic" ClientIDMode="Static"
                                ControlToValidate="txtAddress2" ValidationGroup="vgSave" ErrorMessage="Enter Address 2"
                                Width="90%"><span class="error">Enter address 2</span></asp:RequiredFieldValidator>
                            <asp:CustomValidator ID="cvtxtAddress2" runat="server" ClientIDMode="Static" ControlToValidate="txtAddress2"
                                ClientValidationFunction="fn_ValidateExpressionTextbox" ValidationGroup="vgSave" ValidateEmptyText="false" expressionid="AlpNumSplChar"
                                Display="Dynamic" Width="90%"><span id="Span9" class="error"></span></asp:CustomValidator>
                        </div>
                    </div>
                    <div class="clear"></div>
                    <div class="row">
                        <div class="midium-label">
                            Pin Code&nbsp;&nbsp;<span class="red">*</span>
                        </div>
                        <div class="midium-value">
                            <asp:TextBox ID="txtPinCode" runat="server" ClientIDMode="Static" Width="97%"
                                MaxLength="50" placeholder="Enter Pin Code" CssClass="input" TabIndex="105"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="rfvtxtPinCode" runat="server" Display="Dynamic" ClientIDMode="Static"
                                ControlToValidate="txtPinCode" ValidationGroup="vgSave" ErrorMessage="Enter Pin Code"
                                Width="90%"><span class="error">Enter pin code</span></asp:RequiredFieldValidator>
                            <asp:CustomValidator ID="cvtxtPinCode" runat="server" ClientIDMode="Static" ControlToValidate="txtPinCode"
                                ClientValidationFunction="fn_ValidateExpressionTextbox" ValidationGroup="vgSave" ValidateEmptyText="false" expressionid="AlpNum"
                                Display="Dynamic" Width="90%"><span id="Span10" class="error"></span></asp:CustomValidator>
                        </div>
                    </div>
                    <div class="clear"></div>
                    <div class="row">
                        <div class="midium-label">
                            Fax&nbsp;&nbsp;<span class="red">*</span>
                        </div>
                        <div class="midium-value">
                            <asp:TextBox ID="txtFax" runat="server" ClientIDMode="Static" Width="97%"
                                MaxLength="50" placeholder="Enter Fax" CssClass="input" TabIndex="107"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="rfvtxtFax" runat="server" Display="Dynamic" ClientIDMode="Static"
                                ControlToValidate="txtFax" ValidationGroup="vgSave" ErrorMessage="Enter Fax"
                                Width="90%"><span class="error">Enter fax</span></asp:RequiredFieldValidator>
                            <asp:CustomValidator ID="cvtxtFax" runat="server" ClientIDMode="Static" ControlToValidate="txtFax"
                                ClientValidationFunction="fn_ValidateExpressionTextbox" ValidationGroup="vgSave" ValidateEmptyText="false" expressionid="Phone&Fax"
                                Display="Dynamic" Width="90%"><span id="Span11" class="error"></span></asp:CustomValidator>
                        </div>
                    </div>
                    <div class="clear"></div>
                    <div class="row">
                        <div class="midium-label">
                            PAN&nbsp;&nbsp;<span class="red">*</span>
                        </div>
                        <div class="midium-value">
                            <asp:TextBox ID="txtPAN" runat="server" ClientIDMode="Static" Width="97%"
                                MaxLength="50" placeholder="Enter PAN" CssClass="input" TabIndex="109"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="rfvtxtPAN" runat="server" Display="Dynamic" ClientIDMode="Static"
                                ControlToValidate="txtPAN" ValidationGroup="vgSave" ErrorMessage="Enter PAN"
                                Width="90%"><span class="error">Enter pan</span></asp:RequiredFieldValidator>
                            <asp:CustomValidator ID="cvtxtPAN" runat="server" ClientIDMode="Static" ControlToValidate="txtPAN"
                                ClientValidationFunction="fn_ValidateExpressionTextbox" ValidationGroup="vgSave" ValidateEmptyText="false" expressionid="AlpNum"
                                Display="Dynamic" Width="90%"><span id="Span12" class="error"></span></asp:CustomValidator>
                        </div>
                    </div>
                    <div class="clear"></div>
                    <div class="row">
                        <div class="midium-label">
                            Contact Person Phone
                        </div>
                        <div class="midium-value">
                            <asp:TextBox ID="txtContactPersonPhone" runat="server" ClientIDMode="Static" Width="97%"
                                MaxLength="50" placeholder="Enter Contact Person Phone" CssClass="input" TabIndex="111"></asp:TextBox>
                            <asp:CustomValidator ID="cvtxtContactPersonPhone" runat="server" ClientIDMode="Static" ControlToValidate="txtContactPersonPhone"
                                ClientValidationFunction="fn_ValidateExpressionTextbox" ValidationGroup="vgSave" ValidateEmptyText="false" expressionid="Phone&Fax"
                                Display="Dynamic" Width="90%"><span id="Span13" class="error"></span></asp:CustomValidator>
                        </div>
                    </div>
                    <div class="clear"></div>
                    <div class="row">
                        <div class="midium-label">
                            TIN
                        </div>
                        <div class="midium-value">
                            <asp:TextBox ID="txtTIN" runat="server" ClientIDMode="Static" Width="97%"
                                MaxLength="50" placeholder="Enter TIN" CssClass="input" TabIndex="113"></asp:TextBox>
                            <asp:CustomValidator ID="cvtxtTIN" runat="server" ClientIDMode="Static" ControlToValidate="txtTIN"
                                ClientValidationFunction="fn_ValidateExpressionTextbox" ValidationGroup="vgSave" ValidateEmptyText="false" expressionid="AlpNum"
                                Display="Dynamic" Width="90%"><span id="Span14" class="error"></span></asp:CustomValidator>
                        </div>
                    </div>
                    <div class="clear"></div>
                    <div class="row">
                        <div class="midium-label">
                            Is Active
                        </div>
                        <div class="midium-value">
                            <asp:CheckBox ID="chkIsActive" runat="server" ClientIDMode="Static" TabIndex="115" />
                        </div>
                    </div>
                    <div class="clear"></div>
                </div>
                <div class="clear"></div>
                <div class="pagefooter">
                    <center>
                        <input type="button" id="btnSave" onclick="javascript: return fn_SaveDetails();"
                            tabindex="116" value="Save" validationgroup="vgSave" class="btn-primary" />
                    </center>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cntMain" runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="FootContent" runat="Server">
</asp:Content>

